package ru.sh.panel;

import javax.microedition.khronos.opengles.GL10;

import ru.sh.stats.ShotPower;
import android.view.MotionEvent;
import framework.GameResources;
import framework.GameScreen;
import framework.graphics.TextureRegion;
import framework.objects.ui.UI;
import framework.objects.ui.UIElement;

public class ShotPowerPanel extends UIElement {

	public ShotPowerPanel(GameScreen screen, UI ui, float x0, float y0) {
		super(screen, ui, x0, y0);
	}
	
	private int w = 200;
	private int h = 125;
	private TextureRegion[] textures = new TextureRegion[] {
			new TextureRegion(GameResources.getBitmapName(13), 0, 0, w, h),
			new TextureRegion(GameResources.getBitmapName(13), 0, 0, w, h),
			new TextureRegion(GameResources.getBitmapName(13), w, 0, 2 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), w, 0, 2 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), 2 * w, 0, 3 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), 2 * w, 0, 3 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), 3 * w, 0, 4 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), 3 * w, 0, 4 * w, h),
			
			new TextureRegion(GameResources.getBitmapName(13), 3 * w, 0, 4 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), 3 * w, 0, 4 * w, h),
			new TextureRegion(GameResources.getBitmapName(13), 3 * w, 0, 4 * w, h)
	};
	
	@Override
	public void draw(GL10 gl, float deltaTime) {
		synchronizePosition();
		textures[ShotPower.getValue()].draw(deltaTime, gl, x, y);
	}

	@Override
	protected void initPresentation() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void handle(MotionEvent event) {
		// TODO Auto-generated method stub
		
	}
	
}
